import { useLocation, useNavigate } from "../react-router"

export default function Login() {
  const navigate = useNavigate() // 获取导航对象
  const login = () => {
    localStorage.setItem('login', 'true');
    navigate(to)
  }
  return <button onClick={login}>登录</button>
}
